Tidy up use of environment variables in xenbus-hotplug interaction.
I've changed this to only write "backend" (xenbus_backend.root) into
XENBUS_BASE_PATH. After appending XENBUS_TYPE (also exported) you can
construct the "base path" easily in the scripts. I've completely
removed writing XENBUS_FRONTEND_ID in favour of reading it from the
store at "$XENBUS_PATH/frontend-id".
Avoid re-reading the store over and over for the frontend domain's vm-path.
The patch also fixes a memory leak in backend_bus_id where we
leak the memory referenced by frontend if the function succeeds.
This work is by Christian Limpach.
Signed-off-by: Ewan Mellor <ewan@xensource.com>